<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<?php echo $cabecalho; ?>
<?php echo $menu_esq; ?>
<div id="mainContent">
<h1>Editar Alunos</h1>
<div><?php echo $msg;?></div>
<?php echo form::open("sa/aluno/salvar"); ?>
<table width="100%" border="1">
      <tr>
        <td>nome</td>
        <td>valor</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <?php foreach($alunos as $aluno){?>
      <?php echo form::hidden('id[]', $aluno->id)?>
      <tr bgcolor="#666">
        <td>matricula</td>
        <td><?php echo form::input("matricula[]", $aluno->matricula, "disabled"); ?></td>
      </tr>
	  <tr>
        <td>nome</td>
        <td><?php echo form::input("nome[]", $aluno->nome); ?></td>
      </tr>
      <tr>
        <td>data nascimento</td>
        <td><?php echo form::input("data_nasc[]", $aluno->data_nasc); ?></td>
      </tr>
      <tr>
        <td>rg</td>
        <td><?php echo form::input("rg[]", $aluno->rg); ?></td>
      </tr>
      <tr>
        <td>cpf</td>
        <td><?php echo form::input("cpf[]", $aluno->cpf); ?></td>
      </tr>
      <tr>
        <td>estado</td>
        <td><?php echo form::dropdown("estado[]", $estado, $aluno->estado); ?></td>
      </tr>
      <tr>
        <td>fone</td>
        <td><?php echo form::input("fone[]", $aluno->fone); ?></td>
      </tr>
      <tr>
        <td>sexo</td>
        <td><?php echo form::dropdown("sexo[]", $sexo, $aluno->sexo); ?></td>
      </tr>
      <tr>
        <td>escola</td>
        <td><?php echo form::input("escola[]", $aluno->escola); ?></td>
      </tr>
      <tr>
        <td>responsavel</td>
        <td><?php echo form::input("responsavel[]", $aluno->responsavel); ?></td>
      </tr>
      <tr>
        <td>logradouro</td>
        <td><?php echo form::input("logradouro[]", $aluno->logradouro); ?></td>
      </tr>
      <tr>
        <td>bairro</td>
        <td><?php echo form::input("bairro[]", $aluno->bairro); ?></td>
      </tr>
      <tr>
        <td>periodo ingresso</td>
        <td><?php echo form::dropdown("periodo_ingresso[]", $periodos, $aluno->periodo_ingresso); ?></td>
      </tr>
      <tr>
        <td>forma_ingresso</td>
        <td><?php echo form::dropdown("forma_ingresso[]", $forma_ingresso, $aluno->forma_ingresso); ?></td>
      </tr>
      <tr>
        <td>periodo_desligamento</td>
        <td><?php echo form::dropdown("periodo_desligamento[]", $periodos, $aluno->periodo_desligamento); ?></td>
      </tr>
      <tr>
        <td>forma_desligamento</td>
        <td><?php echo form::dropdown("forma_desligamento[]", $forma_desligamento, $aluno->forma_desligamento); ?></td>
      </tr>
      
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <?php }?>
      <tr>
        <td><?php echo form::submit('enviar', 'Editar')?>&nbsp;</td>
        <td><?php echo html::anchor('sa/aluno/listar/', 'Voltar'); ?>&nbsp;</td>
      </tr>
    </table>
<?php echo form::hidden('acao', 'editar'); ?>
<?php echo form::close(); ?>
<!-- end #mainContent --></div>
<?php echo $rodape; ?>